package com.huluobo.a2112mvvmdouyindemo.mine;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.mvvm_base.bean.UserBeanResult;
import com.huluobo.mvvm_base.model.BaseRepo;

/**
 * Created by LC on 2024/4/10.
 */
public class MineRepo extends BaseRepo {
    public void getUserInfo(String username, MutableLiveData<UserBeanResult.UserBean> success,
                            MutableLiveData<String> failed) {
        UserBeanResult.UserBean userBean = userDao.queryUserInfoByName(username);

        if (userBean != null) {
            success.setValue(userBean);
        } else {
            failed.setValue("查找用户失败");
        }
    }
}
